<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
    <title>主页</title>
    <script src="js/index.js"></script>
    <link rel="stylesheet" href="css/all.css">
    <jsp:useBean id="user" class="gamer.Bean.User" scope="session"/>
</head>
<body class="container">
<div>
    <div class="header">
        <img class="logo-img" src="img/logo.png" alt="logo">
        <div class="menu-div">
            <ul>
                <li style="background-color: #BBB"><a href="index.jsp">首页</a></li>
                <li><a href="jsp/game/gameMenu.jsp">游戏菜单</a></li>
                <%
                    if (user.getUser() == null)
                        out.print("<li><a href=\"jsp/user/login.jsp\">登录</a></li>");
                    else
                        out.print("<li><a href=\"jsp/user/userInfo.jsp\">用户中心</a></li>");
                %>
            </ul>
        </div>
    </div>
    <div class="main-div">
        <%
            if (user.getUser() == null)
                out.print("欢迎使用网站游戏系统<br><br><a href=\"user/login.jsp\">点击登录</a>");
            else
                out.print("欢迎您，" + user.getUser().get("use_id") + "<br><a href=\"user/logout.jsp\">点击注销</a>");
        %>
    </div>
</div>
</body>
</html>
